/*********************************************************************************
 * Copyright (C) 2022-present ISCAS & CESI.
 * PUACleaner is licensed under MulanPSL-2.0.
 * You can use this software according to the terms and conditions of the MulanPSL-2.0.
 * You may obtain a copy of MulanPSL-2.0 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the MulanPSL-2.0 for more details.
 *********************************************************************************/

package cn.puacleaner;

public class PuaCleanerFactory {

    public PuaCleanerFactory(){

    }

    public static PuaCleaner createPuaCleaner(String name){
        PuaCleaner cleaner;
        switch (name){
            case "rkxxPUA":
            case "geshuiPUA":
                cleaner = new RkxxPuaCleaner();
                break;
            case "sogouPUA":
                cleaner = new SogouImePuaCleaner();
                break;
            case "whshebaoPUA":
                cleaner = new WHSheBaoPuaCleaner();
                break;
            case "rsksPUA":
                cleaner = new RsksPuaCleaner();
                break;
            default:
                cleaner = new RkxxPuaCleaner();
                break;
        }
        cleaner.loadMapTable();
        return cleaner;
    }
}
